package com.todo.strategy.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author azhebuxing
 * @date 2024/11/28 02:40
 * @description 此处有很多数据，暂时以enum的形式做，后续可以按照dict的形式，目前只做临时表示
 */
@Getter
@AllArgsConstructor
public enum MemoSuggestStrategyEnum {

    //Spring、Summer、Autumn、Winter
    SA_DongBei_TRAVEL(1, "SA_DongBei_TRAVEL", "春秋东北旅游建议"),
    W_DongBei_TRAVEL(2, "W_DongBei_TRAVEL", "冬天东北旅游建议"),
    ;

    private static Map<Integer, MemoSuggestStrategyEnum> typeMap = Arrays
            .stream(MemoSuggestStrategyEnum.values())
            .collect(Collectors.toMap(MemoSuggestStrategyEnum::getType, item -> item, (v1, v2) -> v2));

    private int type;
    private String code;
    private String name;


    public static MemoSuggestStrategyEnum getByType(Integer type) {
        return typeMap.get(type);
    }
}
